<template>
  <div class="interrogation">
    <van-nav-bar
      title="医生列表"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    >
    <template #right>
      <van-icon name="search" size="18" />
    </template>
    </van-nav-bar>
    <div class="banner">
          <van-swipe class="my-swipe" :autoplay="3000">
            <van-swipe-item v-for="(item,index) in imgList" :key="index">
              <img :src="item" alt="" class="img_item">
            </van-swipe-item>
          </van-swipe>
    </div>
    <div class="gird">
          <div class="question" @click="$router.push('/home/interrogation')">
            <span>快速提问</span>
            <span>智能匹配医生</span>
          </div>
          <div class="shop" @click="$router.push('/home/question')">
            <span>开药门市</span>
            <span>快速开方 送药上门</span>
          </div>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      imgList:[
        'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=1445774767,2153362972&fm=26&gp=0.jpg',
        'https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2724840205,433035322&fm=26&gp=0.jpg',
        'https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1913372599,2477656893&fm=26&gp=0.jpg'
      ],
    }
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    },
    onClickRight() {
      console.log(1)
    },
  },
}
</script>

<style lang="scss" scoped>
    .interrogation{
      width: 100%;
      height: 100%;
      background: #efefef;
      .banner{
        width: 100%;
        .my-swipe{
            width: 100%;
            .img_item{
              width: 90%;
              height: 150px;
              display: block;
              margin: 10px auto;
              border-radius: 20px;
            } 
          }
      }
      .gird{
        width: 100%;
        display: flex;
        justify-content: space-around;
        .question,.shop{
          width: 45%;
          padding: 20px 10px;
          background:#fff;
          border-radius: 10px;
          span{
            display: block;
            color: #000;
          }
        }
      }
    }
</style>